package com.chenwang.measure.ui.dialog;

import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;

import com.chenwang.measure.R;
import com.chenwang.measure.base.BaseDialogFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * @松 on 2019/8/25 09:02
 * APN
 */
public class APNSettingDialog extends BaseDialogFragment {

    @BindView(R.id.et_name)
    EditText mEtName;
    @BindView(R.id.et_user)
    EditText mEtUser;
    @BindView(R.id.et_pass)
    EditText mEtPass;
    Unbinder unbinder;

    @Override
    public int setLayoutId() {
        return R.layout.dialog_apn;
    }

    @Override
    protected void initWindow(Window window) {
        setLayoutParams(window,Gravity.CENTER, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT,0 ,0 );
    }

    @Override
    protected void initData(View view) {
        super.initData(view);
        unbinder = ButterKnife.bind(this, view);
    }



    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @OnClick({R.id.btn_cancel, R.id.btn_confirm})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_cancel:
                dismiss();
                break;
            case R.id.btn_confirm:
                dismiss();
                break;
        }
    }
}
